package znet

import "github.com/desyang-hub/zinx_demo/zface"

type Request struct {
	Conn zface.IConnection
	Message zface.IMessage
}

func (r *Request) GetConnection() zface.IConnection {
	return r.Conn
}

func (r *Request) GetMessage() zface.IMessage {
	// 直接返回Request结构体中的Data字段
	return r.Message
}

func NewRequst(conn zface.IConnection, msg zface.IMessage) (request zface.IRequest) {
	request = &Request{
		Conn: conn,
		Message: msg,
	}

	return request
}
